package com.glut.gultguy.mapper;

import com.glut.gultguy.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2022-09-05
 */
public interface ArticleMapper extends BaseMapper<Article> {

    @Update("update article set _lock = #{b} where _id = #{id}")
    void updateLock(String id, boolean b);
    @Update("update article set click = (click+1) where _id = #{articleId}")
    void addClick(String articleId);
}
